home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
lisp
/
clue.lha
/
clue
/
pcl-patches.l
< prev
next >
Wrap
Lisp/Scheme
|
1989-07-12
|
1KB
|
41 lines
;;; -*- Mode:Common-Lisp; Package:PCL; Base:10; Patch-file:T -*-
;; These patches make the PCL version dated 8/28/88 (AAAI PCL) work with CLUE
(in-package 'xlib :use '(:lisp :pcl))
;;; Use pcl:make-instance* and pcl:initialize-instance*, because
;;; pcl:make-instance and pcl:initialize-instance assume there are
;;; no duplicate arguments in the initialization plist.
(unexport 'pcl::make-instance 'pcl)
(unexport 'pcl::initialize-instance 'pcl)
(export 'xlib::make-instance 'xlib)
(setf (symbol-function 'xlib::make-instance) #'pcl::*make-instance)
(export 'xlib::initialize-instance 'xlib)
(setf (symbol-function 'xlib::initialize-instance) #'pcl::*initialize-instance)
;;; Hack pcl so that simple eql specializers in defmethods are evalled.
;;; Replace this function in pcl/boot.lisp:
(defun parse-specializers (specializers)
(flet ((parse (spec)
(cond ((symbolp spec)
(or (find-class spec nil)
(error
"~S used as a specializer,~%~
but is not the name of a class."
spec)))
((and (listp spec)
(eq (car spec) 'eql)
(null (cddr spec)))
; jkf fix for eql specializer
(cond ((and (listp (cadr spec))
(eq 'quote (car (cadr spec))))
`(eql ,(cadr (cadr spec))))
(t spec)))
(t (error "~S is not a legal specializer." spec)))))
(mapcar #'parse specializers)))